<?php
if (!isset($_GET['searchField'])){
	require_once 'cntrlr/mainpage.php';
} else {
	$factory = Factories::Init();
	$db      = $factory->databaseObject("select", "stocks");
	$array = $db->search($_GET['searchField']);
	if (count($array)==0){
		echo "<br/><br/><h2>Няма намерени резултати.</h2>";
	}	else {
		$_GET["PN"]=1;
		require_once 'vw/userside/productsView.php';
	}
	
}
?>